<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<link rel="stylesheet" href="/static/plugins/kindeditor/themes/default/default.css"/>
<script charset="utf-8" src="/static/plugins/kindeditor/kindeditor-all.js"></script>
<script charset="utf-8" src="/static/plugins/kindeditor/lang/zh-CN.js"></script>
<form id="customerform" method="post" style="padding-top:1px">
    <input type="hidden" id="form-ctid" name="ctid"  >
    <input type="hidden" name="opid" value="0">
    <table style="margin:6px; width: 98%">
        <tr style="height: 30px">
            <td class="label" width="126px" style="text-align: right">合同编号：</td>
            <td>
                <input type="text" id="form-ctcode" readonly="readonly" class="selectp" name="ctcode" autocomplete="off" data-options="required:true" style="width:300px;height: 24px;">
            </td>
            <td class="label" width="126px" style="text-align: right">合同名称：</td>
            <td>
                <input type="text" id="form-ctname" readonly="readonly" class="selectp" name="ctname"  autocomplete="off" data-options="required:true" style="width:300px;height: 24px;">
            </td>
        </tr>
        <tr style="height: 30px">
            <td class="label"  width="126px" style="text-align: right">发货单号：</td>
            <td>
                <input  name="sendno" style="width: 300px;height: 26px;" class="selectp">
            </td>
            <td class="label"  width="126px" style="text-align: right">发货状态：</td>
            <td>
                <input  name="sendStatus" style="width: 300px;height: 26px;" class="selectp">
            </td>
        </tr>
        <tr style="height: 30px">
            <td class="label" width="126px" style="text-align: right">发货日期：</td>
            <td>
                <input id="form-crtime" name="crtime" style="width: 300px;height: 26px;" class="selectp">
            </td>
            <td colspan="2">&nbsp;</td>
        </tr>
        <tr style="height: 30px">
            <td class="label"  width="126px" style="text-align: right">发货详情：</td>
            <td colspan="3">
                <textarea id="sendobj" name="sendobj" style="resize:none;width:774px; height:360px;padding: 6px;visibility:hidden;"></textarea>
            </td>
        </tr>
    </table>
</form>
<script type="text/javascript" charset="utf-8" th:inline="none">
    $(function () {

        $('#form-crtime').datebox({
            formatter: function (date) {
                var y = date.getFullYear();
                var m = date.getMonth() + 1;
                var d = date.getDate();
                return y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);

            }
        });

        $(".combo-text").removeAttr("style");
        $(".combo-text").attr("style", "width: 300px;height: 26px;;line-height:26px");
        $(".combo-text").addClass("selectp");
        $(".combo-arrow").attr("style", "margin-left: -20px;margin-top: 5px;background-color:rgba(0,0,0,0)");
        $(".combo-panel").attr("style", "margin-top:10px;");

        KindEditor.create('textarea[id="sendobj"]', {
            items: ['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
                'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|',"image", 'multiimage',
                '|','insertfile', '|','table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                'anchor', 'link', 'unlink'],
            uploadJson: '/files/fileUpload',//指定上传图片的服务器端程序
            fileManagerJson: '/files/fileManager',//指定浏览远程图片的服务器端程序
            allowFileManager: true,
            afterChange: function(){  //利用该方法处理当富文本编辑框失焦之后，立即同步数据
                KindEditor.sync('textarea[id="sendobj"]') ;
            }
        });
    });

</script>
</html>